<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<input type="button" value="点击按钮" id="btn">
	<img src="../image/1-small .jpg" alt="图片" title="我是图片" id="img">



	<script>

		var btn = document.getElementById('btn');
		var img = document.getElementById("img");

		btn.onclick = function(){
			img.src = "../image/1.jpg";
			img.alt = "切换图片";
			img.title = "好看的图片";
		}

	</script>
</body>
</html>